package com.miaosha.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

import java.io.Serializable;


@Data
@TableName("t_goods")
public class Goods implements Serializable {

    /**
     * 编号
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 名称
     */
    @NotBlank
    private String name;
    /**
     * 价格
     */
    @Positive
    @NotNull
    private Double price;
    /**
     * 图片
     */
    private String image;
    /**
     * 库存
     */
    private Integer stock;
    /**
     * 详情
     */
    private String detail;

    private Long userId;

    private Integer auditStatus;

    private static final long serialVersionUID = 1L;
}